<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./js/jquery.min.js"></script>
    <script src="./a.js"></script>
</head>
<body>
    <div id="title">热更新模板</div>
    <textarea name="" id="textarea" cols="30" rows="10"></textarea>
    
</body>
</html>
<script>
    $.ajax({
        url:'/api/user',
        success:function(res){
            $('#textarea').val(JSON.stringify(res.data))
        },
        error:function(e){
            $('#textarea').val('获取数据失败，请打开mock, 执行命令 cd mock ;npm run dev;')
        }
    })
</script>